<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			
		</div>
		<script type="text/javascript">
			
			var app = new Vue(
				{
					el:'#app',
					data:{
						shop:{
							name:'MI10',
							price:6999
						}
					},
					watch:{
						shop:{
							handler:function(val){
								alert(val.name+"新价格"+val.price+"元");
							},
							deep:true
						}
					}
				}
			);
			app.shop.price=9999;
		</script>
	</body>
</html>
